#ifndef PREFERENCESWINDOW_H
#define PREFERENCESWINDOW_H

#include <QWidget>
#include <QLabel>
#include <QListWidget>
#include <QSpinBox>
#include <QLineEdit>
#include <QFormLayout>
#include <QString>
#include <QDialog>
#include <QToolButton>

class PreferencesWindow : public QDialog
{
    Q_OBJECT
public:
    explicit PreferencesWindow(QWidget* mainWindow);

private:
    QFormLayout layout;

    QLineEdit userNameEntry;
    QLineEdit userPassEntry;
    QLineEdit serverIPEntry;
    QLineEdit serverPassEntry;

    QSpinBox serverPortEntry;
    QSpinBox clientPortEntry;
    QSpinBox appPortEntry;

    QString userName;
    QString userPass;
    QString serverIP;
    QString serverPass;
    QToolButton applyButton;

    int serverPort;
    int clientPort;
    int appPort;
    
signals:
    void apply(QString,QString,QString,QString,int,int,int);

public slots:
    void applied();
    
};

#endif // PREFERENCESWINDOW_H
